{% extends "../theme/bage.html" %}
{% block typebody %}
<script type="text/javascript">
    $().ready(function () {
        $("#form_login").validate(
            {
                rules: {
                    user_name: {
                        required: true
                    },
                    user_pass: {
                        required: true
                    }
                },
                messages: {
                    user_name: {
                        required: "<span class='red'>enter one user name</span>"
                    },

                    user_pass: {
                        required: "<span class='red'>Please enter a password</span>"
                    }
                }
            }
        );
        var kwd_next = "{{kwd['next_url']}}";
        if (kwd_next == '/') {

            document.getElementById('next').value = document.referrer;
        } else {
            document.getElementById('next').value = kwd_next;
        }
    });


</script>


<div class="mtop">
    <ul class="breadcrumb">
        <li>{{ _('Current location') }}: <a href="{% module site_url() %}">{{ _('Home') }}</a></li>
        <li class="active">{{ _('User Login') }}</li>
    </ul>
</div>


<div class="panel panel-black">
    <div class="panel-heading"><b>{{ _('User Login') }} </b></div>
<div class="panel-body">
    <form id="form_login" action="/user/login" method="post" class="form-horizontal" role="form">
        <input type="hidden" name="next" id="next" class="form-control"/>
        <input type="hidden" name="encryption" id="encryption" class="form-control" value="0"/>
        <div class="form-group">
            <label class="col-sm-2 control-label" for="user_name">{{ _('User name') }}： </label>

            <div class="col-sm-10">
                <input type="text" name="user_name" id="user_name" class="form-control"
                       placeholder="Please enter your user name"/>
            </div>
                <br><br>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label" for="user_pass">{{ _('Password') }}：</label>

            <div class="col-sm-10">
{#                <input type="password" name="user_pass" id="user_pass" class="form-control"#}
{#                       onchange="encode('{{ kwd.get('pass_encrypt',',') }}')" placeholder="Please enter your password" >#}
                <input type="password" name="user_pass" id="user_pass" class="form-control"
                    placeholder="Please enter your password" >

            </div>
               <br><br>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label"></label>

            <div class="col-sm-10">
                <button type="submit" class="btn btn-primary">{{ _('Login') }}</button>
            </div>
        </div>
    </form>
    <br>
 <div class="row">
     <div class="col-sm-2"></div>
     <div class="col-sm-10">
    <div class="btn sent-message">Non users of the station？ Please
        <a href="/user/regist">{{ _('Register') }}</a> 。
    </div>
    <br>
    <div class="btn sent-message">
        Forget Password，Try to
        <a href="/user/reset-password"> reset the password</a>
    </div>
         </div>
</div>
</div>
</div>


{% end %}

